<?php

namespace app\admin\model\config;

use think\Model;


class GlobalArea extends Model
{

    

    

    // 表名
    protected $name = 'global_area';
    
    // 自动写入时间戳字段
    protected $autoWriteTimestamp = false;

    // 定义时间戳字段名
    protected $createTime = false;
    protected $updateTime = false;
    protected $deleteTime = false;

    // 追加属性
    protected $append = [
	    'is_hot_text'

    ];
	
	public function getIsHotList()
	{
		return ['0' => __('Is_hot 0'), '1' => __('Is_hot 1')];
	}
	
	
	public function getIsHotTextAttr($value, $data)
	{
		$value = $value ? $value : (isset($data['is_hot']) ? $data['is_hot'] : '');
		$list = $this->getIsHotList();
		return isset($list[$value]) ? $list[$value] : '';
	}
	
	
	
	
	
	
	
	
	
	
	
}
